package com.candy.util;

import com.candy.bean.Student;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test02 {

    public static void main(String[] args) {
        //加载容器
        ApplicationContext ac=new ClassPathXmlApplicationContext("beans2.xml");

        Student student=  ac.getBean("student01", Student.class);
        student.doEatting();
        student.doStuding();
        student.doPlaying();
        System.out.println("++++++++++++++++++++++++++++++++++++");
        student.doEatting();
    }
}
